import os.path

from Pdf import MuPdf
from Video import MuVideo

if __name__ == '__main__':
    # res=MuImages()
    # # nres = res.compress_image("./img/1x.jpg","./img/4x.jpg",max_size=10*1024)
    # nres = res.splicing_images(["./img/1.png","./img/1x.jpg"],"./img/1001.pdf",horizontal=1,img_type="pdf",spacing=20,margins=10,background=(255,255,255,100),side="right")
    # # nres = res.compress_image("./img/1.png","./img/4.png",max_size=200*1024)
    # print(nres,res.get_error_message())
    # print(res.get_error_message())
    # n_size = os.path.getsize("./img/4.png")
    # print("n_size",n_size)
    # res = MuPdf()
    res = MuVideo()
    # back = res.spli_pdf("./img/split/solit/1.pdf","./img/split/solit/111")
    # back = res.jion_pdf("./img/100.pdf,./img/1001.pdf","./img/split/solit/1.pdf")
    # back = res.convert_type("./img/1001.pdf","./img/split/solit/1.docx")
    # print(os.path.exists(os.getcwd()+"/img/100.xlsx"))

    # back =  res.pdf_to_other(os.getcwd()+"/img/100.pdf",os.getcwd()+"/img/split/solit/12.xlsx")
    back = res.video_to_other(os.getcwd()+"/img/1.mp4",os.getcwd()+"/img/split/gif/55.mp4")
    print(back,res.get_error_message())
